The present invention relates to a programmable controller and, more particularly, to a programmable controller of the type which is adapted to update the contents of a user program while that program is running.
Programmable controllers with an ability to update the contents of a user program while the program is being executed have become commonplace. One such programmable controller is disclosed in Japanese Patent Laid-open No. 63-214806. This programmable controller comprises a first memory containing a user program A to be executed by a sequence processor and a second memory containing a user program B. The contents of the second memory may be transferred to the first memory by an update instruction so that the sequence processor may execute the user program B instead of the program A.
One disadvantage of the above-mentioned program controller is that when the user programs are switched for execution by the sequence processor, it takes a significant time to transfer the new user program from the second memory to the first. During the program transfer, the sequence processing must come to a halt. The suspension of the processing represents a significant inconvenience especially where large-size user programs are involved.
One way to circumvent this problem is to provide a function for directly updating part of the user program in the first memory to be accessed by the sequence processor. However, this can result in complications. For example, if a wrong part of the user program is updated, e.g., if an added jump instruction is not matched with its destination, the update will be invalid, while the sequence processor executing the user program successively in the first memory finds it difficult to activate a verification program concurrently for checking for such update errors. With the prior art, such update errors cannot be detected and resolved properly.